package com.example.bicycle.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.util.SaResult;
import com.example.bicycle.domain.vo.PageVo;
import com.example.bicycle.service.ReceiveMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@SaCheckLogin
@RestController
@RequestMapping("/receive/")
public class ReceiveController {
    @Autowired
    ReceiveMessageService receiveMessageService;
    @GetMapping("list")
    public SaResult getAllReceiveList(@RequestParam("pageNum") int pageNum, @RequestParam("pageSize") int pageSize) {
        PageVo pageVo = receiveMessageService.getAllReceiveList(pageNum,pageSize);
        return SaResult.data(pageVo);
    }
}
